-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove mailbox from warp config #5312
base: main
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5312 +/- ##
=======================================
Coverage 77.53% 77.53%
=======================================
Files 103 103
Lines 2110 2110
Branches 190 190
=======================================
Hits 1636 1636
Misses 453 453
Partials 21 21
|
export const WarpRouteDeployConfigSchema = z | ||
.record(HypTokenRouterConfigSchema) | ||
.refine(refineTokens, WarpRouteDeployConfigSchemaErrors.NO_SYNTHETIC_ONLY) | ||
.transform(transformRebaseConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally prefer not to include drive-bys like this except because it makes what would otherwise be a very easy to review PR much harder to review
IIUC we have better test coverage on this now so relying on that exercising this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really sure what exactly you mean with drive-bys,
I refactored this section since both WarpRouteDeployConfigSchema and WarpRouteDeployConfigSchemaWithoutMailbox needed to share the same refine and transform functions.
export const HypTokenRouterConfigWithoutMailboxSchema = | ||
HypTokenConfigSchema.and(GasRouterConfigSchema.omit({ mailbox: true })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think zod will not error on extraneous fields so wondering why not just remove the mailbox field from the existing schema?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I understood correctly but it is not possible do remove mailbox from MailBoxClienSchema
as it is required for other parts of code, also omit is not supported for HypTokenRouterConfigMailboxSchema
Description
Refactors Warp Route configuration to make mailbox addresses optional during initial config creation. This change separates the mailbox configuration from the base token configuration, introducing new types
WarpRouteDeployConfigWithoutMailbox
andHypTokenRouterConfigWithoutMailbox
. This improves the configuration workflow by allowing more flexible mailbox address handling.Drive-by changes
isAddress
importRelated issues
#5237
#5258
Backward compatibility
Yes - This change maintains backward compatibility while providing more flexibility in configuration